Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C#: Update .NET 8 Runtime models. #16872

Merged
merged 5 commits into from
Aug 14, 2024

Conversation

michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Jun 28, 2024

In this PR we update the .NET 8 Runtime models. Since the last update there has been several updates to the model generator that affects the model generator output.

  • Sink models are no longer generated in case there already exist a manual sink model.
  • Source models are generated.
  • Changes to the dataflow library that slightly affects the generated summary models.

With respect to source models, we introduce neutrals for a couple of the generated models as they are not sources (even though flow is detected, the conditions that apply on the path means that they are not sources).
That is, we exclude

  • get_SystemDirectory (this can be excluded as this is not a source due to a hardcoded constant).
  • GetPreviousVersion and get_ProcessName might come from a serialised value from disc, but I don’t think we should generally consider these file or file-write source.

Running DCA using the new (local) sources, we get many new results (especially for the cs/tainted-path query). I have spot checked some of these on the powershell project and all the new results (that I checked) are due to the GetTempPath and GetFolderPath sources. GetTempPath reads the temp directory value from an environment variable (so this should be considered an environment source) and GetFolderPath in some cases reads from the environment (if eg. the path to the current users home folder is requested). The GetFolderPath is a more speculative source, but lets include it and see if we get many false positive alerts.

@github-actions github-actions bot added the C# label Jun 28, 2024
Copy link
Contributor

github-actions bot commented Jun 28, 2024

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

csharp

Generated file changes for csharp

  • Changes to framework-coverage-csharp.rst:
-    System,"``System.*``, ``System``",44,10614,60,9
+    System,"``System.*``, ``System``",47,10626,54,5
-    Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``JsonToItemsTaskFactory``, ``Microsoft.Android.Build``, ``Microsoft.Apple.Build``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.DotNet.Build.Tasks``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NET.WebAssembly.Webcil``, ``Microsoft.VisualBasic``, ``Microsoft.WebAssembly.Build.Tasks``, ``Microsoft.Win32``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",54,1821,148,
+    Others,"``Amazon.Lambda.APIGatewayEvents``, ``Amazon.Lambda.Core``, ``Dapper``, ``ILCompiler``, ``ILLink.RoslynAnalyzer``, ``ILLink.Shared``, ``ILLink.Tasks``, ``Internal.IL``, ``Internal.Pgo``, ``Internal.TypeSystem``, ``JsonToItemsTaskFactory``, ``Microsoft.Android.Build``, ``Microsoft.Apple.Build``, ``Microsoft.ApplicationBlocks.Data``, ``Microsoft.CSharp``, ``Microsoft.Diagnostics.Tools.Pgo``, ``Microsoft.DotNet.Build.Tasks``, ``Microsoft.EntityFrameworkCore``, ``Microsoft.Extensions.Caching.Distributed``, ``Microsoft.Extensions.Caching.Memory``, ``Microsoft.Extensions.Configuration``, ``Microsoft.Extensions.DependencyInjection``, ``Microsoft.Extensions.DependencyModel``, ``Microsoft.Extensions.Diagnostics.Metrics``, ``Microsoft.Extensions.FileProviders``, ``Microsoft.Extensions.FileSystemGlobbing``, ``Microsoft.Extensions.Hosting``, ``Microsoft.Extensions.Http``, ``Microsoft.Extensions.Logging``, ``Microsoft.Extensions.Options``, ``Microsoft.Extensions.Primitives``, ``Microsoft.Interop``, ``Microsoft.NET.Build.Tasks``, ``Microsoft.NET.WebAssembly.Webcil``, ``Microsoft.VisualBasic``, ``Microsoft.WebAssembly.Build.Tasks``, ``Microsoft.Win32``, ``Mono.Linker``, ``MySql.Data.MySqlClient``, ``Newtonsoft.Json``, ``SourceGenerators``, ``Windows.Security.Cryptography.Core``",57,1821,148,
-    Totals,,98,12442,402,9
+    Totals,,104,12454,396,5
  • Changes to framework-coverage-csharp.csv:
- Microsoft.Android.Build,,,16,,,,,,,,,,,,,,,,,,,16,
+ Microsoft.Android.Build,,1,16,,,,,,,,,,,,,1,,,,,,16,
- Microsoft.Extensions.Configuration,,2,90,,,,,,,,,,,,,2,,,,,,89,1
+ Microsoft.Extensions.Configuration,,3,90,,,,,,,,,,,,,3,,,,,,89,1
- Microsoft.Extensions.DependencyModel,,,18,,,,,,,,,,,,,,,,,,,18,
+ Microsoft.Extensions.DependencyModel,,1,18,,,,,,,,,,,,,1,,,,,,18,
- System,60,44,10614,,7,6,5,,,4,5,,33,2,,3,15,17,3,4,,8709,1905
+ System,54,47,10626,,6,5,5,,,4,1,,33,2,,6,15,17,3,4,,8721,1905

@michaelnebel michaelnebel force-pushed the csharp/updatedotnetmodels branch 2 times, most recently from cec568e to e6df6db Compare July 18, 2024 14:39
@michaelnebel michaelnebel force-pushed the csharp/updatedotnetmodels branch 2 times, most recently from 3f1939c to 6d9985f Compare August 12, 2024 13:50
@michaelnebel michaelnebel marked this pull request as ready for review August 13, 2024 07:51
@michaelnebel michaelnebel requested a review from a team as a code owner August 13, 2024 07:51
@michaelnebel michaelnebel merged commit 27e9cb5 into github:main Aug 14, 2024
21 checks passed
@michaelnebel michaelnebel deleted the csharp/updatedotnetmodels branch August 14, 2024 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants